package com.example.android.synchronization;

public class ThreadEvent
{
	private final Object lock = new Object();

	public void signal()
	{
		synchronized (lock)
		{
			lock.notify();
		}
	}

	public void await()
	{
		synchronized (lock)
		{
			try
			{
				lock.wait();
			} catch (InterruptedException e)
			{
				e.printStackTrace();
			}
		}
	}
}
